SpotCheck Logo

Compiling with Code Warrior:

CodeWarrior has the curious feature that it requires the Apple Script system extension to be loaded before it will respond to AppleEvents. If SpotCheck can find and launch CodeWarrior, but can’t seem to make it do anything, you may need to install Apple Script and restart your Mac.

GenieWorks has tried to isolate SpotCheck users from the complexities of using CodeWarrior as much as possible. In doing so, GenieWorks has chosen a particular set of project settings for CodeWarrior Java projects created automatically by SpotCheck. You may find that these settings are not quite what you need. If so, you can simply make the necessary adjustments after SpotCheck has directed CodeWarrior to create the project. (SpotCheck does this automatically, the first time you compile your project.)

SpotCheck’s default project document is for an Applet subclass that also has a static "main" method, allowing it to be run as a standalone application. The CodeWarrior project settings have been tuned for this default, creating a "Runable Zip File".

SpotCheck will set the "File Name" and "Main Class" automatically, using the name of your SpotCheck project document minus the ".Spot" extension. The name of the CodeWarrior project document itself is set according to a similar convention; if you change this name by hand, SpotCheck will be unable to find the project to compile.

After SpotCheck sends the "compile" AppleEvent to CodeWarrior, it waits for a response. The response event either will indicate success, or will contain a list of error messages. In the latter case, SpotCheck unpacks these and provides a simple "compiler error dialog" for browsing through the errors, selecting the closest bit of syntax for display. You can close the compiler error dialog, and reopen it with "Show Errors".

SpotCheck cannot tell (presently) if you have edited the on-disk .java text files, for example if you used CodeWarrior to browse through and fix any errors reported after an attempted compilation. As such, unless you remember to make the same changes within the SpotCheck project document, your changes will be lost the next time SpotCheck regenerates the .java text files.

We recommend making all your changes within SpotCheck.

Another problem arises if CodeWarrior’s "Message Window" has the lower pane open, showing the code for each error message listed in the upper pane. If that is the case, the .java text file being displayed is open in CodeWarrior, and SpotCheck will be unable to overwrite that file on the next compile. If you toggle the lower pane closed (using the little triangle on the left), there will be no problem.

Return to LessonSpotCheck Logo

© 1997 GenieWorks, LLC. All rights reserved